The first topic is
Google Cloud Armor, which lets you use
content-based rules to filter inbound requests. There are three ways to filter inbound requests to
a Cloud Run service. You're looking at a
diagram that shows the various components that incoming requests flow through. There are two routes. Requests come through the
global HTTPS load balancer and the default
or custom domain. There are three components
that can filter traffic. The first is Google Cloud Armor. It is integrated with the global load
balancer and it lets you filter incoming traffic
using content-based rules. For example, you can use it to set IP allow and deny rules, filter on IP geolocation, or use more complex
custom rules. The second are Ingress
settings and Cloud Run. You can use the Ingress to filter traffic based
on its source. This is of course, not
granular filter as it supports only three
different source types. The final filter is IAM, which lets you filter traffic based on the identity
of the sender. We'll explore all
three components in more detail in the
rest of this course. Before we go into depth, it's good to know that
you're only charged for a request if it reaches
the Cloud Run service. If it's rejected earlier by
one of the three filters, you do not pay for the request. Do you recall the structure of the global HTTPS load
balancer with the front-end, URL map, and backend services? A Cloud Run service can be a backend in a backend service, and Google Cloud
Armor is enabled at the level of the
backend service. Google Cloud Armor
filters traffic with content-based rules that inspect the properties of the
incoming request. For example, you can add conditions based on
an incoming request, IP address, IP range, region code, or request headers. A policy rule is the
main building block of a Google Cloud
Armor security policy. A policy rule can be
very simple or complex. A simple policy rule is deny
requests from a specific IP. More complex rules are the
custom conditions that matching various attributes
of the incoming requests, such as the URL path, request method, or
request header values. Pre-configuration
rules also exist to mitigate the
following attacks. Cross-site scripting,
SQL injection attacks, local file inclusion attacks, remote file inclusion attacks, and remote code
execution attacks. Policy rules are a part
of every security policy, and the security policy is
attached to a backend service. You can attach a policy to one or multiple
backend services.